tinymce.PluginManager.add("leanote_nav",function(t){function n(){var n=t.getBody(),o=$(n),a=o.html();if(e!=a){e=a;for(var i=o.find("h1,h2,h3,h4,h5,h6").toArray(),h="<ul>",l=0;l<i.length;++l){var c=$(i[l]).text(),r=i[l].tagName.toLowerCase();h+='<li class="nav-'+r+'"><a data-a="'+r+"-"+encodeURI(c)+'" onclick="scrollTo(this, \''+r+"', '"+c+"')\">"+c+"</a></li>"}h+="</ul>",$("#leanoteNavContent").html(h).height("auto"),i.length||$("#leanoteNavContent").html("&nbsp; Nothing...");var d=$("#leanoteNavContent").height(),g=$("#editorContent_ifr").height()-29;d>g&&$("#leanoteNavContent").height(g)}}var e="";t.on("init",function(){window.setTimeout(function(){n(),t.on("setcontent beforeadd undo paste",n),t.on("ExecCommand",function(){n()}),t.on("click",function(){n(),$("body").trigger("click")})},0)})});